<?PHP 
$userid = isset($_COOKIE["gwt_userid"]) ? $_COOKIE["gwt_userid"] : "";
$zfb = isset($_COOKIE["gwt_zfb"]) ? $_COOKIE["gwt_zfb"] : "";
$phone = isset($_COOKIE["gwt_phone"]) ? $_COOKIE["gwt_phone"] : "";
$email = isset($_COOKIE["gwt_email"]) ? $_COOKIE["gwt_email"] : "";
?>

<?PHP
date_default_timezone_set("Asia/Chongqing");
include("../../config/connect.php");
include("../../public/common.php");
$q = trim(CheckUrlParamNoDie("q"));
$catid = CheckUrlParamNoDie("catid");

if($userid != "")
{
	$sql = "select id, tb_id, password, level, tubi, type from user where id=$userid limit 1";
	$result = mysql_query( $sql );
	$row = mysql_fetch_assoc( $result );
	$user_type = $row["type"];
	$code = MakeRecommendCodeFrom($userid, $user_type);	
}

$lastDate = strtotime('2011-12-21 00:00:00'); //活动开始时间戳
$ttime=time(); //当前时间戳
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name ="keywords" content="购物兔,购物兔返现网,购物兔省钱浏览器,聚划算返利,返现网,返利网,返利,淘宝网返利,商城返利,京东返利,淘宝网女装返利,淘宝网女鞋打折,淘宝网男装促销,淘宝网包包秒杀,淘宝化妆品赠送"/>
<meta name="Description" content="购物兔是国内最知名的购物省钱浏览器，返现最快，当天内直接到账，返现最安全，100%不漏单；无论您在淘宝网，还是京东、当当等其他商城购物，即使是促销价也能返现，实现折上再打折，真正省钱，是您网络购物省钱的首选！" />
<title>购物返利狂欢节-购物得双倍兔币，注册领现金！</title>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<link type="text/css" rel="stylesheet" href="../css/topss.css" />
<link type="text/css" rel="stylesheet" href="css/carnival.css" />
<script language="javascript" src="../js/jquery.min.js"></script>
</head>
<body>
<div id="container">
	<div class="head">
    	<a href="http://www.gouwutu.com" target="_blank" id="logo" title="购物兔——省钱就这么简单">购物兔——省钱就这么简单</a>
        <a href="http://www.gouwutu.com/download.php?opt=zip" title="购物兔下载" class="down">购物兔下载</a>
        <div class="xitong">
            <p style="line-height:20px; padding-left:5px;">版本号：2.12.8.86<br>更新日期：2011-12-8<br>支持系统：XP/Vista/Win7</p>
            <p style="background:#FFF; width:160px;"><iframe width="160" scrolling="no" height="16" frameborder="0" align="middle" allowtransparency="true" marginheight="0" marginwidth="0" name="zhufuyu" src="http://www.gouwutu.com/download.php?opt=view"></iframe></p>
        </div>
    </div>
    <div id="content">
    	<div class="rule">
        	<div class="rule_a"></div>	
            <div class="rule_b">
            	<div class="rule_b_a">
                	<div class="title">
                    	<h2>活动时间与规则</h2>
                        <b style="color:#E0012E;">时间：2011年12月20日 - 2012年1月15日截止</b>
                    </div>
                    <div class="neirong">
                    	<h2>一、赠送双倍兔币</h2>
                        <p>参与资格：所有用户<br />赠送规则：下载购物兔浏览器并成功购物<br />赠送时间：交易成功并确认收货</p>
                        <h2>二、注册送现金</h2>
                        <p>参与资格：活动期间注册的新用户<br />赠送规则：下载购物兔浏览器并绑定支付宝账号（无需密码）<br />奖金设置：分别为3元、5元、10元、30元、50元、100元等现金礼包<br />中奖规则：每天随机抽取10名幸运新用户<br />领奖时间：每期有效时间截止当日零时，次日中午12点公布中奖信息，并发送奖金至绑定支付宝</p>
                        <h2>三、参与资格</h2>
                        <p>参与资格：所有用户<br />赠送规则：1、邀请的用户被抽中为幸运新用户，推荐人也将获得等额奖金<br />2、邀请人数成功购物最多者，将获得神秘大礼包<br />领奖时间：1、每期有效时间截止当日零时，次日中午12点公布中奖信息，并发送奖金至绑定支付宝<br />2、神秘大礼包将在活动结束后送出</p>
                    </div>	
                    <div class="title he" style="border:none;">
                    	<h2>今日幸运用户</h2>
                    </div>
                    <div class="names">
                    	<div class="names_a">
                        	<b style="width:150px;">中奖用户</b>
                            <b style="width:80px;">奖金</b>
                            <b style="width:173px;">注册时间</b>
                            <b style="width:80px; display:none;">期数</b>
                            <b style="width:180px;">中奖理由</b>
                      	</div>
<?php
if($lastDate > $ttime) //活动时间开始大于当前时间
{
?>                        
<script type="text/javascript">
  var Marquee = function(id){
    try{document.execCommand("BackgroundImageCache", false, true);}catch(e){};
    var container = document.getElementById(id),
    original = container.getElementsByTagName("ul")[0],
    clone = container.getElementsByTagName("ol")[0],
    speed = arguments[1] || 50;
    clone.innerHTML=original.innerHTML;
    var rolling = function(){
      if(container.scrollTop == clone.offsetTop){
        container.scrollTop = 0;
      }else{
        container.scrollTop++;
      }
    }
    var timer = setInterval(rolling,speed)//设置定时器
    container.onmouseover=function() {clearInterval(timer)}//鼠标移到marquee上时，清除定时器，停止滚动
    container.onmouseout=function() {timer=setInterval(rolling,speed)}//鼠标移开时重设定时器
  }
  window.onload = function(){
    Marquee("marquee");
  }
</script> 
<?php
}
?>
                        <div id="marquee">
                        	<ul>
                            <?php
							if($lastDate < $ttime)
							{
								echo '<div style="background:url(img/carnival/zizizi.jpg) no-repeat center center; width:586px; height:160px;"></div>';
							}else
							{
							$sql = "select c.winning as winning,c.bonus as bonus,c.rea as rea,c.time as time,u.reg_time as regtime from gwt_hd_carnival as c,user as u where c.winning = u.tb_id order by c.id desc limit 20";
							$result = mysql_query($sql);
							$i = 0;
							while( $result && $row = mysql_fetch_assoc($result))
							{
								$i++;
							?>
                            	<li  class="splist" <?PHP if ($i % 2 == 0) echo ' style="background:#fff;"'; else echo ' style="background:#f5f5f5;"' ?> >
                                    <span style="width:150px;"><?PHP echo substr($row["winning"], 0, 4)."***".substr($row["winning"], -4); ?></span>
                                    <span style="width:80px;"><?php echo $row["bonus"]; ?>&nbsp;元</span>
                                    <span style="width:173px;"><?php echo $row["regtime"]; ?></span>
                                    <span style="width:80px;display:none;">第<?php
									
									echo intval((strtotime($row["time"]) - $lastDate) / (3600 * 24)); //期数 
									?>期
                                    </span>
                                    <span style="width:180px;"><?php echo $row["rea"]; ?></span>
                                </li>
                            <?php
							}
							}
							?>
                            </ul>
                            <ol></ol>
                        </div>
                    </div>
                    <div class="title he">
                    	<h2>推荐商家</h2>
                    </div>
                    <div class="guid">
                    	<ul style="overflow:hidden;">
                        <?php 
							$sql = "select * from daohang where pic_url!='' and see>10 order by see limit 5";
							$result = mysql_query($sql);
							while( $result && $row = mysql_fetch_array( $result ))
							{
						?>
                        	<li>
                            	<a target="_blank" title="<?php echo $row["title"]; ?>" href="<?php echo $row["url"]; ?>" class="pic"><img width="100" height="45" alt="<?php echo $row["title"]; ?>" src="<?php echo $row["pic_url"]; ?>"></a>
                        	</li>
                        <?php
							}
						?>
                    	</ul>
                    </div>
                </div>
                <?php
					if($userid == "")
						echo '<a href="http://www.gouwutu.com/myservices/bangding.html?ref='.urlencode("www.gouwutu.com/new/activity/carnival.php").'" target="_blank" class="reg">立即注册</a>';
				?>
                <div class="invite">
                	<div style=" position:relative; height:47px;">
                        <div class="btn" id="yaoqing" onclick="showdiv()">立即邀请好友</div>
                        <div class="layer" id="layer" style="display:none;">
                        	<div class="la_close"><span onclick="hidddiv()"></span></div>
                        	<div class="layer_a">
                                <!-- JiaThis Button BEGIN -->
    
                                <div id="ckepop">
                                <span class="jiathis_txt" style="font-size:13px;"> 立即推荐给朋友：</span>
                                <div onclick="AddTubi()">
                                <a class="jiathis_button_qzone"></a>
                                <a class="jiathis_button_tsina"></a>
                                <a class="jiathis_button_renren"></a>
                                <a class="jiathis_button_kaixin001"></a>
                                <a href="http://www.jiathis.com/share/?uid=904300" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
                                <a class="jiathis_counter_style"></a></div></div>
                            
                                <!-- JiaThis Button END -->
                            </div>
                            <?php
								if($userid == "")
								{
									echo '<div style="padding-left:10px;"><a href="http://www.gouwutu.com/myservices/bangding.html?ref='.urlencode("www.gouwutu.com/new/activity/carnival.php").'" target="_blank" style="color:#E0012E; text-decoration:underline;">你还没有绑定支付宝账号，点此绑定账号!</a></div>';
								}else{
							?>
                            <div class="total" style="font-size:12px; *padding:14px 20px; *height:auto;"><input type="hidden" id="rmdurl_src" value="http://www.gouwutu.com/rmd/<?PHP echo $code; ?>.html"/>&nbsp;&nbsp;您的邀请链接是：<img src="http://www.gouwutu.com/myservices/images/convert.gif" align="absmiddle" title="点击转换为短域名形式的推荐链接" onclick="Convert()" style="cursor:pointer;" />&nbsp;&nbsp;<input type="text" id="rmdurl" value="http://www.gouwutu.com/rmd/<?PHP echo $code; ?>.html" style="border:none; width:286px; background:none" onclick="javascript:select();"/></div>
                            <?php
								}
							?>
                        </div>
                    </div>
                </div>
            </div>
            <div class="rule_c"></div>	
        </div>
        
        <div class="circuit">
        	<div class="circuit_a"></div>
            <div class="circuit_b">
            	<div class="pu_boyd_mid">
                    <ul class="ul_p_list">
                    <?php
					$sql = "select * from gwt_dh_goods where dhtag!='真情回馈' and dhnumber>0 order by rand(now()) LIMIT 4";
					$result2 = mysql_query($sql);
					while( $result2 && $row2 = mysql_fetch_assoc( $result2 ))
					{
					?>
						<li>
                            <p class="li_pic"><a title="<?php echo $row2["dhtitle"]; ?>" href="http://www.gouwutu.com/dh/index.php?catalog=<?php echo urlencode($row2["dhtag"]); ?>&gid=<?php echo $row2["id"]; ?>"><img alt="<?php echo $row2["dhtitle"]; ?>" src="<?php echo $row2["dhpic"]; ?>"></a></p>
                            <p class="li_title"><a title="<?php echo $row2["dhtitle"]; ?>" href="http://www.gouwutu.com/dh/index.php?catalog=<?php echo urlencode($row2["dhtag"]); ?>&gid=<?php echo $row2["id"]; ?>"><?php echo $row2["dhtitle"]; ?></a></p>
                            <p class="li_money">需要兔币：<font color="#FF0000"><?php echo $row2["tumoney"]; ?></font><img width="16" height="16" alt="兔币" src="../../dh/images/jin.gif" title="兔币"></p>
                            <p class="li_num">剩余数量：<font color="#FF0000"><?php echo $row2["dhnumber"]; ?></font></p>
                        </li>
                  	<?php
					}
					?>
               		</ul>
                </div>
            </div>
            <div class="circuit_c"></div>
        </div>
        
    </div>
</div>
<?php
include("../ft.php");
?>
</body>
</html>
<script language="javascript">
function hidddiv() 
{ 
	document.getElementById('layer').style.display= 'none'; 
} 
function showdiv() 
{ 
	document.getElementById("layer").style.display= 'block'; 
}
 
function Convert()
{
	var obj = document.getElementById("rmdurl");
	if (obj.value.indexOf("http://t.cn") == -1)
	{
		var url = "http://www.gouwutu.com/funapi/short_url.php?url=" + obj.value;
		$.ajax({url: url,
				async: false,
				success:function(result){
	//			alert(res);
				obj.value = result;
			   },
			   failure:function(result){
				   alert("转换失败，请重试~");
			   }
			})
	}
	else
	{
		obj.value = document.getElementById("rmdurl_src").value;
	}
}
</script>
<!-- JiaThis Button BEGIN -->
<script type="text/javascript">
	var jiathis_config = {
		data_track_clickback:true,
		url: "http://www.gouwutu.com",
		title: "我一直使用#购物兔#在淘宝上购物，超简单，通过返现达到真正省钱，而且还能折上再折；更重要的是返现超快，当天直接到账，全自动！如果你经常淘宝，强烈建议用用看，都上QQ新闻了(http://tech.qq.com/a/20110307/000325.htm)！上网搜索一下就知道了~ （分享自 @购物兔）！"
	}
</script>
<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js?uid=904300" charset="utf-8"></script>
<!-- JiaThis Button END -->

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-20984072-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7eb75a7b189f4a709dead85bc20eb0dd' type='text/javascript'%3E%3C/script%3E"));
</script>
